package org.file5.service;

import java.io.IOException;

import org.file5.domain.Attachment;
import org.file5.exception.ImageTooLargeException;
import org.file5.exception.InvalidSwagImageException;
import org.file5.exception.LoadImageFromURLException;
import org.file5.util.DataBean;

public interface AttachmentService {

	public Attachment populateAttachmentImage(Attachment swagItem)
			throws LoadImageFromURLException, ImageTooLargeException,
			InvalidSwagImageException, IOException;
	public byte[] getThumbnailBytes(String key,Integer width,Integer height);
	
	public Attachment update(Attachment attachment);
	public void delete(String uid);


	/**
	 * Gets list of Attachment
	 *
	 * @param startPosition
	 * @param maxResult
	 * @param params, supported Parameters:
	 * 								String: fileType
	 *
	 * @return
	 */
	public DataBean<Attachment> getAttachments(int startPosition,int maxResult,final Object... params);

}
